home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- #include <exec/memory.h>
- #include <dos/dos.h>
- #include <dos/dosextens.h>
- #include <intuition/intuition.h>
- #include <intuition/gadgetclass.h>
- #include <intuition/intuitionbase.h>
- #include <intuition/classusr.h>
- #include <intuition/imageclass.h>
- #include <intuition/gadgetclass.h>
- #include <intuition/cghooks.h>
- #include <intuition/icclass.h>
- #include <intuition/classes.h>
- #include <intuition/sghooks.h>
- #include <intuition/screens.h>
- #include <graphics/gfxbase.h>
- #include <graphics/text.h>
- #include <graphics/gfxmacros.h>
- #include <utility/tagitem.h>
- #include <utility/hooks.h>
- #include <string.h>
- #include "gaugeclass.h"
-
- int my_strlen(char s[])
- {
- int i=0;
- while (s[i]!='\0')++i;
- return(i);
- }
-
- UBYTE long_2_string_with_thousand(ULONG num, char output[], char point, BOOL negative)
- {
- char output_private[16];
- char n = 0;
- char n_1 = 0;
-
- if(negative)output[n_1++]='-';
- sprintf(output_private,"%12ld",num);
- while(output_private[n]==0x20)n++;
- for(;(output_private[n]!=0)&(output_private[n]!=0x20);n++)
- {
- output[n_1++]=output_private[n];
- if((n==2)||(n==5)||(n==8)) output[n_1++]=(char)point;
- }
- output[n_1]=0;
- return(n_1);
- }
-
- void draw_border_new( struct RastPort *rp,ULONG x, ULONG y, ULONG width, ULONG height, int b_col1, int b_col2 )
- {
- width--;height--;
- SetAPen(rp,b_col1);
- RectFill(rp,x,y,x,y+height);
- RectFill(rp,x,y,x+width,y);
- SetAPen(rp,b_col2);
- RectFill(rp,x+width,y,x+width,y+height);
- RectFill(rp,x,y+height,x+width,y+height);
- }
-
- my_RectFill(struct RastPort *rp,WORD x,WORD y,WORD width,WORD height)
- {
- if(((x+width)>1)&&((y+height)>1)) RectFill(rp,x,y,x+width-1,y+height-1);
- }
-
- my_Blit(struct RastPort *src, WORD topx, WORD topy, struct RastPort *dest, WORD dtopx, WORD dtopy, WORD width, WORD height)
- {
- ClipBlit(src,topx,topy,dest,dtopx,dtopy,width,height,0xC0);
- }
-
- FreePenNew( struct Screen *scr, struct GAU_Color *col,ULONG number, ULONG *Pens)
- {
- if(!col->pen) ReleasePen(scr->ViewPort.ColorMap,Pens[number]);
- }
-
- UWORD obtainPen( struct Screen *src, struct GAU_Color *scr)
- {
- return(scr->pen ? scr->red : ObtainBestPenA(src->ViewPort.ColorMap, scr->red, scr->green, scr->blue, 0L) );
- }
-
- GetPenNew(struct gpRender *msg,struct GAU_Color *col,ULONG number, BOOL *PorC, ULONG *Pens)
- {
- PorC[number]= col->pen ? FALSE : TRUE;
- Pens[number]= obtainPen(msg->gpr_GInfo->gi_Screen,col);
- }
-
- struct TextFont *OpenTopaz()
- {
- static struct TextAttr topaz_font =
- {
- "topaz.font",
- 8,
- 0,
- FPF_ROMFONT,
- };
- return((struct TextFont *)OpenFont( &topaz_font));
- }
-
-